﻿using System;
using System.Collections.ObjectModel;
using System.ComponentModel;

namespace CloudTaobao
{
    public class TransForm : INotifyPropertyChanged
    {
        public event PropertyChangedEventHandler PropertyChanged;
        public string _out_sid;
        public string out_sid 
        {
            get
            {
                return _out_sid;
            }
            set
            {
                _out_sid = value;
                NotifyPropertyChanged("out_sid");
            }
        }

        
        public string _company_name;
        public string company_name
        {
            get
            {
                return _company_name;
            }
            set
            {
                _company_name = value;
                NotifyPropertyChanged("company_name");
            }
        }
        public string tid { get; set; }
        public string _status;
        public string status
        {
            get
            {
                return _status;
            }
            set
            {
                _status = value;
                NotifyPropertyChanged("status");
            }
        }
        public ObservableCollection<TransitStepInfo> transitStepInfos { get; set; }

        public TransForm()
        {
            _out_sid = "";
            _company_name = "";
            tid = "";
            _status = "";
            transitStepInfos = new ObservableCollection<TransitStepInfo>();
        }

        private void NotifyPropertyChanged(string propertyName)
        {
            if (null != PropertyChanged)
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
        }
    }

    public class TransitStepInfo
    {
        public string status_time { get; set; }
        public string status_desc { get; set; }
        public string color { get; set; }

        public TransitStepInfo()
        {
            status_time = "";
            status_desc = "";
            color = "LightYellow";
        }
    }
}
